﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Gammar.Digger.BLL;
using Gammar.Digger.SystemFramework;
using Gammar.Digger.Entity;

public partial class status_PluginDetailLog : System.Web.UI.Page
{
    string _statusId = string.Empty;
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            _statusId = Request.QueryString["statusid"];

            if (StringHelper.IsInt(_statusId))
            {
                SortList<plugin_run_logEntity> logs = StatusManagement.GetPluginLogs(int.Parse(_statusId));
                rptPluginLogs.DataSource = logs;
                rptPluginLogs.DataBind();
            }
        }
    }

    protected string GetEventType(object obj)
    {
        if (obj == null)
        {
            return "<font color='blue'>unknown</font>";
        }
        else
        {
            if ((int)DataCollectService.event_type.error==(int)obj)
            {
                return "<font color='red'>" + Enum.GetName(typeof(DataCollectService.event_type), int.Parse(obj.ToString())) + "</font>";
            }
            else
            {
                return Enum.GetName(typeof(DataCollectService.event_type), int.Parse(obj.ToString())) ;
            }

           
        }
    }
}
